﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="frmEditPost.aspx.cs" Inherits="WapCrawler.Post.frmEditPost" ValidateRequest="false" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <%--<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"/>--%>
    <ajaxToolkit:TabContainer ID="TabContainerPost" runat="server" ActiveTabIndex="0"
        Width="100%">
        <ajaxToolkit:TabPanel ID="TabPanelPostDetails" runat="server" HeaderText="Content">
            <HeaderTemplate>
                Content
            </HeaderTemplate>
            <ContentTemplate>
                <asp:DetailsView ID="PostDetailsView" runat="server" AutoGenerateRows="False" DataKeyNames="postId"
                    DataSourceID="PostLinqDataSource" Height="50px" Width="100%" AllowPaging="True">
                    <Fields>
                        <asp:TemplateField HeaderText="Title">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtTitle" runat="server" Text='<%# Bind("title") %>' Font-Bold="True"
                                    Width="100%"></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lblTitle" runat="server" Text='<%# Eval("title") %>' Font-Bold="True"
                                    Width="100%"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Head">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtHead" runat="server" Rows="20" Text='<%# Bind("head") %>'
                                    TextMode="MultiLine" Width="100%"></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lblContent" runat="server" Text='<%# Eval("head") %>' Width="100%"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Content">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtContent" runat="server" Rows="20" Text='<%# Bind("content") %>'
                                    TextMode="MultiLine" Width="100%"></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lblContent" runat="server" Text='<%# Eval("content") %>' Width="100%"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" ShowInsertButton="True" />
                    </Fields>
                </asp:DetailsView>
                <div>
                    <asp:LinqDataSource ID="PostLinqDataSource" runat="server" ContextTypeName="WapCrawlerLib.WapDataClassesDataContext"
                        EntityTypeName="" TableName="Posts" EnableDelete="True" 
                        EnableInsert="True" EnableUpdate="True">
                    </asp:LinqDataSource>
                </div>
                <div class="form">
                    <span>Title</span>
                    <asp:TextBox ID="txtPostTitle" runat="server" Text='<%# Bind("title") %>' Font-Bold="True"
                        Font-Size="Small" Width="100%"></asp:TextBox>
                    <span>Head</span><br />
                    <asp:TextBox ID="TextBox1" runat="server" Rows="5" Text='<%# Bind("head") %>' TextMode="MultiLine"
                        Width="100%"></asp:TextBox>
                    <span>Content</span><br />
                    <asp:TextBox ID="txtEditPostContent" runat="server" Rows="20" Text='<%# Bind("content") %>'
                        TextMode="MultiLine" Width="100%"></asp:TextBox>
                    <asp:Button ID="btnUpdate" runat="server" Text="Update" />
                </div>
            </ContentTemplate>
        </ajaxToolkit:TabPanel>
        <ajaxToolkit:TabPanel ID="TabPanelPostFiles" runat="server" HeaderText="Files">
            <HeaderTemplate>
                Files
            </HeaderTemplate>
            <ContentTemplate>
            </ContentTemplate>
        </ajaxToolkit:TabPanel>
        <ajaxToolkit:TabPanel ID="TabPanelImage" runat="server" HeaderText="Images">
            <HeaderTemplate>
                Images
            </HeaderTemplate>
            <ContentTemplate>
            </ContentTemplate>
        </ajaxToolkit:TabPanel>
    </ajaxToolkit:TabContainer>
</asp:Content>
